/**
 * Decription 虚拟机字符串
 * Date 2017/10/6 16:34
 * authur MangoDai
 **/
public class StringIntern {

    /**
     * 1.8 true true
     * 1.7.0_80 true true
     * 1.6
     * @param args
     */
    public static void main(String[] args) {
        System.out.println(System.getProperty("java.version"));

        String str = new StringBuilder("123").append("45").toString();
        System.out.println(str.intern() == str);

        String str1 = new StringBuilder("ja").append("ja").toString();
        System.out.println(str1.intern() == str1);
    }
}
